const makePower = (power)=>(number)=>Math.pow(number,power)

let power2 = makePower(2)
let power3 = makePower(3)

console.log(power2(4))
console.log(power3(4))